package com.anXin.mall.controller;

import com.anXin.mall.service.MallService;
import com.anXin.model.common.dtos.ResponseResult;
import com.anXin.model.mall.pojos.Mall;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/mall")
public class MallController {

    @Resource
    private MallService mallService;

    @GetMapping("/setting")
    public ResponseResult<Mall> getMall(){
        return mallService.getMall();
    }

    @PostMapping("/updateSet")
    public ResponseResult<String> updateMall(@RequestBody Mall mall){
        return mallService.updataMall(mall);

    }


}
